package string;

/**
 * boolean startsWith(String str)
 * boolean endsWith(String str)
 * 判断字符串是否以指定的字符串开头、结尾的
 */
public class StartsWithDemo {
    public static void main(String[] args) {
        String str = "www.hello.world.cn";
        System.out.println(str.startsWith("www"));
        System.out.println(str.startsWith("cc"));
    }
}
